package org.ccay.message.service.impl;

import java.util.Map;

import javax.inject.Inject;
import javax.inject.Named;

import org.ccay.core.exception.ApplicationException;
import org.ccay.core.scheduler.IMaintenanceTask;
import org.ccay.message.service.IPushMessageService;

/**
 * 
 * 消息推送定时清理任务
 * @author chaowangbang
 * @since 2012-12-24
 */
@Named("ITimerTask.PushMessageCleanTask")
public class PushMessageCleanTask implements IMaintenanceTask {
	
	@Inject
	private IPushMessageService pushMessageService;

	/**
	 * 定时清理用户消息数量大于100的消息记录
	 */
	public void executeOnTime(Map<String, String> parameters) throws ApplicationException {
		pushMessageService.deleteUselessMessage();
	}
}
